Skip to main content

Array.isArray

Pagpapaliwanag

Array Static Method

Check if yung pinass mong argument ay isang array.
boolean return value

const array = [1, 2, 3, 4, 5];
const string = "string";
const object = { name: "mmvergara" };

console.log(Array.isArray(array)); // true
console.log(Array.isArray(string)); // false
console.log(Array.isArray(object)); // false

Iba pang resources